//
//  bb.hpp   --- Handles statistical functions
//
#ifndef BB_HPP
#define BB_HPP

#include "object.hpp"


//#define BETA    1
#ifdef TESTDRIVE
     #define TRIAL_RUNS 30
#endif

// Definitions
#define TRUE    1
#define FALSE   0

#define  HIGHEST_NUMBER 100
#define  MAX_NUMBERS    6
#define  MAX_PLAYS      5

#define MAX_PORT_NAMELEN    16
#define MAX_USERID_NAMELEN  32

#define RELEASE_LEVEL       2

#ifdef MAIN
#define GLOBAL
#endif
#ifdef MODULE
#define GLOBAL  extern 
#endif

// Local Data 
GLOBAL char    COMPNAME[]
#ifdef MAIN
= "LOTTO SOFTWARE, LTD."
#endif
;

GLOBAL char    PROGNAME[]
#ifdef MAIN
= "BEST BET"
#endif
;

GLOBAL char    PROGNAMETM[]
#ifdef MAIN
= "BEST BET(tm) U.S.A."
#endif
;

GLOBAL char    PHONENO[]
#ifdef MAIN
= "(713) 937-0355"
#endif
;

GLOBAL char    VERSION[]
#ifdef TESTDRIVE
    #ifdef MAIN
    =  "2.4 Test Drive"
    #endif
#else
    #ifdef MAIN
    =  "2.4"
    #endif
#endif
;

GLOBAL char    SMARTFILTER[]
#ifdef MAIN
=  "SMART-FILTER"
#endif
;


GLOBAL BOOL    thinkingEnabled
#ifdef MAIN
= TRUE;
#endif
;

GLOBAL BOOL    selectionEnabled
#ifdef MAIN
= TRUE;
#endif
;

GLOBAL  UserProfile     theProfile;

GLOBAL  GameControl     theGame;

//
//  A Playboard object holds the six selected numbers and performs a variety
//  of functions in support of Lottery numbers.
//
class PlayBoard : public Object
{
public:
    LNUM    lottoNumbers[ MAX_NUMBERS ];
    LNUM    maxNum, minNum;    
    LNUM    n1, n2, n3, n4, n5, n6;
    int     countSelected;     
    int     displaySorted;
    int     indexToMachine;

    PlayBoard();
    int     isA() { return OBJTYPE_APP; }
    int     calculatePlayboard();
    void    getRange();
    void    showPlayboard(int nPlay);    
    int     validChoice(LNUM n);    
    LNUM    randomPick();
    void    sort();
    int     operator ==(PlayBoard& aLotto);
    int     operator !=(PlayBoard& aLotto);
};
//
//  A PlaySlip object is used to hold multiple playboards.
//
class PlaySlip : public Object
{
public:
    PlaySlip();
    int     isA() { return OBJTYPE_APP; }
    PlayBoard   playBoards[ MAX_PLAYS ];
};

#ifdef USE_WINDOWS      // if using windows for testing, define some stuff
enum COLORS {
    BLACK,          /* dark colors */
    BLUE,
    GREEN,
    CYAN,
    RED,
    MAGENTA,
    BROWN,
    LIGHTGRAY,
    DARKGRAY,       /* light colors */
    LIGHTBLUE,
    LIGHTGREEN,
    LIGHTCYAN,
    LIGHTRED,
    LIGHTMAGENTA,
    YELLOW,
    WHITE
};

#endif

#endif
